import React, { useEffect, useState } from "react";
import "../../../styles/Allocate/List/Details.scss";
import { useLocation, useNavigate } from "react-router-dom";
interface Props {

}
function Details(props: Props) {
    var location = useLocation();
    var navigate = useNavigate();
    var [data, setData]: any = useState([]);
    //详情
    useEffect(() => {
        setData(location.state);
    }, []);
    console.log(data);

    var back = () => {
        navigate("/index/home/AllocateManagement");
    };
    return (
        <div className='Details'>
            <div className='top'>仓储管理 / 出库管理 / 出库详情</div>
            <div className='core'>
                <div className="box">
                    <div className="line">
                        调拨单号:<span>{data.tracking}</span>
                    </div>
                    <div className="line">
                        操作人员:<span>{data.people}</span>
                    </div>
                    <div className="line">
                        调出仓库:<span>{data.diaochu}</span>
                    </div>
                    <div className="line">
                        申请时间:<span>{data.shenqing}</span>
                    </div>
                    <div className="line">
                        审核时间:<span>{data.shenhetime}</span>
                    </div>
                    <div className="line">
                        入库时间:<span>{data.ruku}</span>
                    </div>
                    <div className="line">
                        出库时间:<span>{data.outbound}</span>
                    </div>
                    <div className="line">
                        状态:<span>{data.transfer}</span>
                    </div>
                </div>
                <div className="btn">
                    <button onClick={back}>返回</button>
                </div>
            </div>

        </div>
    );
}

export default Details;